#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "../umlcore/PartialElement.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class Type;

/// <summary>
/// TypedElement
/// A TypedElement is a NamedElement that may have a Type specified for it.
/// </summary>
class UMLMODEL_EXPORT TypedElement : public PartialElement {

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// type getter
    /// The type of the TypedElement.
    /// </summary>
    shared_ptr<Type> type() const;

    /// <summary>
    /// type setter
    /// The type of the TypedElement.
    /// </summary>
    void setType(shared_ptr<Type> value);

private: // Fields
    /// <summary>
    /// type
    /// The type of the TypedElement.
    /// </summary>
    shared_ptr<Type> type_;

};

} // namespace uml
